/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define MOTO1_CH1_Pin GPIO_PIN_0
#define MOTO1_CH1_GPIO_Port GPIOA
#define MOTO1_CH2_Pin GPIO_PIN_1
#define MOTO1_CH2_GPIO_Port GPIOA
#define MOTO1_PWM_PIN_Pin GPIO_PIN_5
#define MOTO1_PWM_PIN_GPIO_Port GPIOA
#define MOTO2_CH1_Pin GPIO_PIN_6
#define MOTO2_CH1_GPIO_Port GPIOA
#define MOTO2_CH2_Pin GPIO_PIN_7
#define MOTO2_CH2_GPIO_Port GPIOA
#define MOTO2_IN2_Pin GPIO_PIN_7
#define MOTO2_IN2_GPIO_Port GPIOE
#define MOTO2_IN1_Pin GPIO_PIN_8
#define MOTO2_IN1_GPIO_Port GPIOE
#define MOTO1_2_STBY_Pin GPIO_PIN_9
#define MOTO1_2_STBY_GPIO_Port GPIOE
#define MOTO1_IN1_Pin GPIO_PIN_10
#define MOTO1_IN1_GPIO_Port GPIOE
#define MOTO1_IN2_Pin GPIO_PIN_11
#define MOTO1_IN2_GPIO_Port GPIOE
#define MOTO3_PWM_PIN_Pin GPIO_PIN_10
#define MOTO3_PWM_PIN_GPIO_Port GPIOB
#define MOTO4_PWM_PIN_Pin GPIO_PIN_11
#define MOTO4_PWM_PIN_GPIO_Port GPIOB
#define LED_Pin GPIO_PIN_13
#define LED_GPIO_Port GPIOB
#define MOTO3_IN2_Pin GPIO_PIN_15
#define MOTO3_IN2_GPIO_Port GPIOB
#define MOTO3_IN1_Pin GPIO_PIN_8
#define MOTO3_IN1_GPIO_Port GPIOD
#define MOTO3_4_STBY_Pin GPIO_PIN_9
#define MOTO3_4_STBY_GPIO_Port GPIOD
#define MOTO4_IN1_Pin GPIO_PIN_10
#define MOTO4_IN1_GPIO_Port GPIOD
#define MOTO4_IN2_Pin GPIO_PIN_11
#define MOTO4_IN2_GPIO_Port GPIOD
#define MOTO3_CH1_Pin GPIO_PIN_12
#define MOTO3_CH1_GPIO_Port GPIOD
#define MOTO3_CH2_Pin GPIO_PIN_13
#define MOTO3_CH2_GPIO_Port GPIOD
#define MOTO4_CH1_Pin GPIO_PIN_6
#define MOTO4_CH1_GPIO_Port GPIOC
#define MOTO4_CH2_Pin GPIO_PIN_7
#define MOTO4_CH2_GPIO_Port GPIOC
#define MOTO2_PWM_PIN_Pin GPIO_PIN_3
#define MOTO2_PWM_PIN_GPIO_Port GPIOB
#define AVOID2_EXTI_Pin GPIO_PIN_0
#define AVOID2_EXTI_GPIO_Port GPIOE
#define AVOID2_EXTI_EXTI_IRQn EXTI0_IRQn
#define AVOID1_EXTI_Pin GPIO_PIN_1
#define AVOID1_EXTI_GPIO_Port GPIOE
#define AVOID1_EXTI_EXTI_IRQn EXTI1_IRQn
/* USER CODE BEGIN Private defines */
#define MOTO_TIM_SOURSE htim2
#define MOTO1_PWM_CH TIM_CHANNEL_2
#define MOTO2_PWM_CH TIM_CHANNEL_1
#define MOTO3_PWM_CH TIM_CHANNEL_3
#define MOTO4_PWM_CH TIM_CHANNEL_4


/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
